<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>ng-model-设置数据同步时机提交</title>
		<script type="text/javascript" src="../org/angular.min.js" ></script>
	</head>
	<body>
		<div ng-app = "app" ng-controller = "ctrl" ng-init="aaaa">
			<!--失去焦点后更新-->
			<!--<input type="text" ng-model="title" ng-model-options="{updateOn:'blur'}" />-->
			<!--一定时间后更新-->
			<!--<input type="text" ng-model="title" ng-model-options="{debounce:1000}" />-->
			<!--一定时间或失去焦点后更新-->
			<input type="text" ng-model="title" ng-model-options="{updateOn:'default blur',debounce:{default:1000,blur:0}}" />
			{{title}}
		</div> 
		
		<script>
			var myApp = angular.module('app',[]);
			myApp.controller("ctrl",['$scope',function($scope){
				 
			}]);
		</script>
	</body>
</html>
